package top.lixunda.ecommerce.server.user.api.entity.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;
import top.lixunda.common.validate.annotation.XumBetween;
import top.lixunda.common.validate.annotation.XumNotNull;
import top.lixunda.common.validate.annotation.XumRegex;

/**
 * @author Xumda
 * @version time:2019/12/15 11:52
 *
 * 根据密码修改密码，需要图片验证码
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ChangePassPassDTO {

    /**
     * 原密码
     */
    @XumNotNull
    @XumBetween(min = 6, max = 32)
    private String oldPass;

    /**
     * 新密码
     */
    @XumNotNull
    @XumBetween(min = 6, max = 32)
    private String newPass;

    /**
     * 图片验证码
     */
    @XumNotNull
    @XumRegex("^[0-9a-zA-Z]{4,6}$")
    private String code;

}
